/**
 */
package org.xtext.example.mydsl.myDsl.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.xtext.example.mydsl.myDsl.MyDslPackage;
import org.xtext.example.mydsl.myDsl.Translation;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Translation</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.xtext.example.mydsl.myDsl.impl.TranslationImpl#getXCord <em>XCord</em>}</li>
 *   <li>{@link org.xtext.example.mydsl.myDsl.impl.TranslationImpl#getYCord <em>YCord</em>}</li>
 *   <li>{@link org.xtext.example.mydsl.myDsl.impl.TranslationImpl#getZCord <em>ZCord</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class TranslationImpl extends MinimalEObjectImpl.Container implements Translation
{
  /**
   * The default value of the '{@link #getXCord() <em>XCord</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getXCord()
   * @generated
   * @ordered
   */
  protected static final String XCORD_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getXCord() <em>XCord</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getXCord()
   * @generated
   * @ordered
   */
  protected String xCord = XCORD_EDEFAULT;

  /**
   * The default value of the '{@link #getYCord() <em>YCord</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getYCord()
   * @generated
   * @ordered
   */
  protected static final String YCORD_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getYCord() <em>YCord</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getYCord()
   * @generated
   * @ordered
   */
  protected String yCord = YCORD_EDEFAULT;

  /**
   * The default value of the '{@link #getZCord() <em>ZCord</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getZCord()
   * @generated
   * @ordered
   */
  protected static final String ZCORD_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getZCord() <em>ZCord</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getZCord()
   * @generated
   * @ordered
   */
  protected String zCord = ZCORD_EDEFAULT;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected TranslationImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return MyDslPackage.Literals.TRANSLATION;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getXCord()
  {
    return xCord;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setXCord(String newXCord)
  {
    String oldXCord = xCord;
    xCord = newXCord;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, MyDslPackage.TRANSLATION__XCORD, oldXCord, xCord));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getYCord()
  {
    return yCord;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setYCord(String newYCord)
  {
    String oldYCord = yCord;
    yCord = newYCord;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, MyDslPackage.TRANSLATION__YCORD, oldYCord, yCord));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getZCord()
  {
    return zCord;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setZCord(String newZCord)
  {
    String oldZCord = zCord;
    zCord = newZCord;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, MyDslPackage.TRANSLATION__ZCORD, oldZCord, zCord));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case MyDslPackage.TRANSLATION__XCORD:
        return getXCord();
      case MyDslPackage.TRANSLATION__YCORD:
        return getYCord();
      case MyDslPackage.TRANSLATION__ZCORD:
        return getZCord();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case MyDslPackage.TRANSLATION__XCORD:
        setXCord((String)newValue);
        return;
      case MyDslPackage.TRANSLATION__YCORD:
        setYCord((String)newValue);
        return;
      case MyDslPackage.TRANSLATION__ZCORD:
        setZCord((String)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case MyDslPackage.TRANSLATION__XCORD:
        setXCord(XCORD_EDEFAULT);
        return;
      case MyDslPackage.TRANSLATION__YCORD:
        setYCord(YCORD_EDEFAULT);
        return;
      case MyDslPackage.TRANSLATION__ZCORD:
        setZCord(ZCORD_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case MyDslPackage.TRANSLATION__XCORD:
        return XCORD_EDEFAULT == null ? xCord != null : !XCORD_EDEFAULT.equals(xCord);
      case MyDslPackage.TRANSLATION__YCORD:
        return YCORD_EDEFAULT == null ? yCord != null : !YCORD_EDEFAULT.equals(yCord);
      case MyDslPackage.TRANSLATION__ZCORD:
        return ZCORD_EDEFAULT == null ? zCord != null : !ZCORD_EDEFAULT.equals(zCord);
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (xCord: ");
    result.append(xCord);
    result.append(", yCord: ");
    result.append(yCord);
    result.append(", zCord: ");
    result.append(zCord);
    result.append(')');
    return result.toString();
  }

} //TranslationImpl
